Skip to main content
GET
/
v1
/
tasks
Get Tasks
curl --request GET \
  --url https://api.xpander.ai/v1/tasks \
  --header 'x-api-key: <api-key>'
{
  "items": [
    {
      "id": "<string>",
      "agent_id": "<string>",
      "organization_id": "<string>",
      "status": "pending",
      "user_id": "<string>",
      "parent_task_id": "<string>",
      "triggering_agent_id": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "source_node_type": "<string>",
      "result": "<string>",
      "title": "<string>"
    }
  ],
  "total": 123,
  "page": 123,
  "per_page": 123,
  "total_pages": 123
}
Retrieve a paginated list of tasks with optional filtering by status, agent ID, or creation date. Useful for monitoring task execution across your organization or for specific agents.

Query Parameters

page
integer
default:1
Page number (starting from 1)
per_page
integer
default:20
Items per page (maximum 50)
user_id
string
Filter by user ID who created the task
agent_id
string
Filter by specific agent UUID
parent_task_id
string
Filter by parent task ID (for sub-tasks)
triggering_agent_id
string
Filter by triggering agent ID (parent calling agent in multi-agent workflows)
status
string
Filter by task status: pending, executing, paused, error, failed, completed, stopped
internal_status
string
Filter by internal task processing status
from_date
string
Filter tasks created on or after this date (ISO 8601, e.g., 2026-02-01T00:00:00Z)
to_date
string
Filter tasks created on or before this date (ISO 8601)

Response

items
array
Array of task objects
total
integer
Total number of tasks matching the filter across all pages
page
integer
Current page number
per_page
integer
Number of items returned per page
total_pages
integer
Total number of pages available

Example Requests

# List all tasks (first page)
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?page=1&per_page=10"

# Filter by status
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?status=completed&page=1&per_page=10"

# Filter by agent
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?agent_id=<agent-id>&page=1"

# Filter by date range
curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/tasks?from_date=2026-02-01T00:00:00Z&to_date=2026-02-07T23:59:59Z"

Example Response

{
  "items": [
    {
      "id": "81250b20-e9d7-4b3b-9995-07dc72b4bb59",
      "agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "user_id": null,
      "parent_task_id": null,
      "triggering_agent_id": null,
      "organization_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
      "status": "completed",
      "created_at": "2026-02-07T02:13:27.228497Z",
      "updated_at": "2026-02-07T02:13:41.541072Z",
      "source_node_type": "sdk",
      "result": "{\"name\":\"xpander.ai\",\"notes\":\"Full-stack agent platform...\"}",
      "title": "What is xpander.ai?"
    }
  ],
  "total": 4300,
  "page": 1,
  "per_page": 2,
  "total_pages": 2150
}

Use Cases

  • Monitor task volume - Track total tasks and completion rates
  • Filter by agent - See tasks for a specific agent
  • Find completed work - Retrieve only successful task executions
  • Track recent activity - Filter by creation date range

Authorizations

x-api-key
string
header
required

API Key for authentication

Query Parameters

page
integer
default:1

Page number (starting from 1)

Required range: x >= 1
per_page
integer
default:20

Items per page (max 50)

Required range: 1 <= x <= 50
user_id
string

filter by user id (optional)

parent_task_id
string

filter by parent task id (optional)

agent_id
string

filter by agent id (optional)

triggering_agent_id
string

filter by triggering agent id (parent calling agent) (optional)

status
enum<string>

filter by task status (optional)

Available options:
pending,
executing,
paused,
error,
failed,
completed,
stopped
internal_status
string

filter by internal status (optional)

from_date
string<date-time>

filter tasks created on or after this date (ISO 8601, optional)

to_date
string<date-time>

filter tasks created on or before this date (ISO 8601, optional)

Response

Successful Response

items
TasksListItem · object[]
required
total
integer
required
page
integer
required
per_page
integer
required
total_pages
integer
required